** CDD vs CDI
estimates clear
foreach x of numlist 1/3 {
use "$data\4_individual_ano_reg_`x'.dta", clear
	
	local c=1 

	foreach o in CDD CDI {
		local d=`c'+1
		

		* Regression
		* =============================
		eststo m`c'`x': areg `o' assignment $controls_balance wrcon_2021 missing_wrcon_2021 i.wave  $se_indiv
		
		qui summ `o' if assignment==0
		local mu : di %5.2f r(mean)
		estadd local mu `mu'
		
		local ++c 
	}
}

esttab m1* m2* using "$results\01_tables\Table_S14_results_ind_contract_type.tex", keep(assignment) b(%5.2f) scalars("mu Mean")   r2  obslast se  nonumbers  mtitle("6 M." "18 M." "Pooled" "6 M." "18 M." "Pooled") mgroups("CDD" "CDI", pattern(1 0 0 1 0 0))  starlevels( * 0.10 ** 0.05 *** 0.01) nonotes replace  

 